﻿<%@ Page Language="C#" MasterPageFile="~/ManageCenter/SystemSetMaster.master" AutoEventWireup="true" CodeFile="ManageUsers.aspx.cs" Inherits="ManageCenter_ManageUsers" Title="用户管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div style="text-align:right; padding-right:60px; height:35px; padding-top:10px">
        &nbsp;
        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/main_444.jpg" OnClick="ImageButton1_Click" />
    </div>
    <asp:GridView ID="gvshowusers" runat="server" CssClass="GridViewStyle"  AutoGenerateColumns="False" Width="100%" AllowPaging="True" 
                    EmptyDataText="暂无用户" PagerSettings-Visible="false" OnRowCommand="gvshowusers_RowCommand" OnRowDataBound="gvshowusers_RowDataBound">
        <FooterStyle CssClass="FooterStyle" />
        <RowStyle CssClass="RowStyle" />
        <EmptyDataRowStyle CssClass="EmptyRowStyle" />
        <PagerStyle CssClass="PagerStyle" />
        <SelectedRowStyle CssClass="SelectedRowStyle" />
        <HeaderStyle CssClass="HeaderStyle" />
        <EditRowStyle CssClass="EditRowStyle" />
        <AlternatingRowStyle CssClass="AltRowStyle" />
        <Columns>
            <asp:TemplateField HeaderText="ID">
                <ItemTemplate>
                    <%#Eval("user_id")%>
                </ItemTemplate>
                <ItemStyle Width="15%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="用户名">
                <ItemTemplate>
                    <%#Eval("user_name")%>
                </ItemTemplate>
                <ItemStyle Width="15%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="详情">
                <ItemTemplate>
                    <%#GetUserTpye(Eval("user_type").ToString(), Eval("user_street").ToString())%>
                </ItemTemplate>
                <ItemStyle Width="50%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <asp:LinkButton ID="lkbtnview" runat="server" CommandName="view" ValidationGroup="2" CommandArgument='<%#Eval("user_id") %>'>修改</asp:LinkButton>&nbsp;&nbsp;&nbsp;
                    <asp:LinkButton ID="lkbtndel" runat="server" CommandName="del" CommandArgument='<%#Eval("user_id") %>'>删除</asp:LinkButton>
                </ItemTemplate>
                <ItemStyle Width="20%" />
            </asp:TemplateField>
        </Columns>
        <PagerSettings Visible="False" />
    </asp:GridView>
    <div style="text-align:center; font-size:15px">
        <br />
        <asp:Button ID="btnfirstpage" runat="server" Text="首页" OnClick="btnfirstpage_Click" ValidationGroup="2" />
        <asp:Button ID="btnprepage" runat="server" OnClick="btnprepage_Click" Text="上一页" ValidationGroup="2" />
        <asp:Button ID="btnnextpage" runat="server" OnClick="btnnextpage_Click" Text="下一页" ValidationGroup="2" />
        <asp:Button ID="btnlastpage" runat="server" Text="尾页" OnClick="btnlastpage_Click" ValidationGroup="2" />&nbsp;
        转跳到：<asp:DropDownList ID="ddlpages" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlpages_SelectedIndexChanged">
        </asp:DropDownList>
    </div>
    <br /><br />
    <div style="text-align:center; font-size:15px">
        <asp:Panel ID="paneuserinfor" runat="server" Width="100%" Visible="false">
            <div style="width:400px; text-align:left">
                用 户 名：<asp:TextBox ID="txbusername" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txbusername"
                    ErrorMessage="*"></asp:RequiredFieldValidator><br />
                <br />
                用户级别：<asp:DropDownList ID="ddltype" runat="server">
                    <asp:ListItem>街道办事处</asp:ListItem>
                    <asp:ListItem>辖区房管所</asp:ListItem>
                    <asp:ListItem>民政部门</asp:ListItem>
                    <asp:ListItem>住房保障管理中心</asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="ddlstreet" runat="server" Font-Size="15px">
                    <asp:ListItem>海曙</asp:ListItem>
                    <asp:ListItem Value="江厦">江厦</asp:ListItem>
                    <asp:ListItem>月湖</asp:ListItem>
                    <asp:ListItem>南门</asp:ListItem>
                    <asp:ListItem>鼓楼</asp:ListItem>
                    <asp:ListItem>西门</asp:ListItem>
                    <asp:ListItem>白云</asp:ListItem>
                    <asp:ListItem>望春</asp:ListItem>
                    <asp:ListItem>段塘</asp:ListItem>
                </asp:DropDownList><br />
                <br />
                密 &nbsp;&nbsp; 码：<asp:TextBox ID="txbpwd" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txbpwd"
                    ErrorMessage="*"></asp:RequiredFieldValidator><br />
                <br />
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                <asp:Button ID="btnupdate" runat="server" Text="确认修改" OnClick="btnupdate_Click" />
                <asp:Label ID="lbluserid" runat="server" Visible="False"></asp:Label></div>
        </asp:Panel>
        
    </div>
<script>
 function ss()
{
var i=window.open('<%=url %>','','Width=350px;Height=200px;scroll=0;help=0;status=0');
window.location.href=window.location.href;
}
</script>
</asp:Content>


